package com.china08.yxyapi.repository.db.statistics;

import java.util.Date;
import java.util.List;

import org.springframework.data.jpa.repository.JpaRepository;

import com.china08.yxyapi.entity.db.statistics.AreaResourceReport;

/**
 * 地区资源统计, 每个区县,每天统计一条数据
 *
 */

public interface AreaResourceReportRepository extends JpaRepository<AreaResourceReport, String> {

    public AreaResourceReport findByIntDateAndAreaIdDistrict(Integer intDay, String district);
   
	public List<AreaResourceReport> findByAreaIdDistrictAndStatisticsDateGreaterThan(String districtCode,
			Date predictDate);

	public List<AreaResourceReport> findByAreaIdCityAndStatisticsDateGreaterThan(String districtCode, Date predictDate);

	public List<AreaResourceReport> findByAreaIdProvinceAndStatisticsDateGreaterThan(String districtCode,
			Date predictDate);


	public List<AreaResourceReport> findByAreaIdDistrictAndIntDate(String districtCode, Integer oldDates);

	public List<AreaResourceReport> findByAreaIdCityAndIntDate(String districtCode, Integer oldDates);

	public List<AreaResourceReport> findByAreaIdProvinceAndIntDate(String districtCode, Integer oldDates);

}
